package com.taikang.base;


import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

public interface DAO<E, C> {

    int insert(E entity);

    int deleteByPrimaryKey(Long id);

    int updateByPrimaryKey(E record);

    E selectByPrimaryKey(Long id);

    List<E> findAll();

    List<E> findByConditions(RowBounds bounds, @Param("condition") C condition);

    int count(@Param("condition") C condition);
}
